Conversation
4f1a2b0 to
98a2b59
Compare
38c8cdf to
36668e2
Compare
BeneBr
commented
Jul 21, 2025
nicoddemus
approved these changes
Jul 21, 2025
cauebs
approved these changes
Jul 21, 2025
c6fc94a to
835b040
Compare
cauebs
reviewed
Jul 29, 2025
b041a86 to
654d94f
Compare
bd7f02f to
654d94f
Compare
- Make the version be a object of Version; - Make the version property be optional in remove_plugin; - Use the rsplit to obtain the correct name of plugin from its folder;
6b2e725 to
b85b49f
Compare
for more information, see https://pre-commit.ci
Comment on lines
+133
to
+147
|
|
||
| yaml_data = PluginInfo._load_yaml_file(yaml_content) | ||
| plugin_id: str = yaml_data["id"] | ||
| plugin_version: str = yaml_data["version"] | ||
| plugin_id_version = f"{plugin_id}-{plugin_version}" | ||
|
|
||
| plugins_dirs = [x for x in dest_path.iterdir() if x.is_dir()] | ||
|
|
||
| if plugin_id in [x.name for x in plugins_dirs]: | ||
| if plugin_id_version in [x.name for x in plugins_dirs]: | ||
| raise PluginAlreadyInstalledError("Plugin already installed") | ||
|
|
||
| plugin_destination_folder = dest_path / plugin_id | ||
| plugin_destination_folder = dest_path / plugin_id_version | ||
| plugin_destination_folder.mkdir(parents=True) | ||
| plugin_file_zip.extractall(plugin_destination_folder) | ||
| return plugin_id | ||
| return InstalledPluginInfo(version=Version(plugin_version), id=plugin_id) |
Contributor
There was a problem hiding this comment.
How will existing installed plugins be handled?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update the
hookmanto handle multiple plugins installed in theplugins_dirASIM-6224